package com.example.demo.model;

public class Router {
    private Node dst;
    private int dstId;
    private Node next;
    private int nextId;
    private int metric;
    //路由备份
    private Node next2;
    private int nextId2;
    private int metric2;
    //链路状态标记
    private int state1;
    private int state2;

    /*public Router(Node n, int id) {
        this.dst = n;
        this.dstId = id;
    }*/
    public Router() {}

    public Router(Router r) {
        this.dst = r.dst;
        this.dstId = r.dstId;
        this.next = r.next;
        this.nextId = r.nextId;
        this.metric = r.metric;
        this.state1 = -1;
        this.state2 = -1;
    }

    public Node getDst() {
        return dst;
    }

    public void setDst(Node dst) {
        this.dst = dst;
    }

    public int getDstId() {
        return dstId;
    }

    public void setDstId(int dstId) {
        this.dstId = dstId;
    }

    public Node getNext() {
        return next;
    }

    public void setNext(Node next) {
        this.next = next;
    }

    public int getNextId() {
        return nextId;
    }

    public void setNextId(int nextId) {
        this.nextId = nextId;
    }

    public int getMetric() {
        return metric;
    }

    public void setMetric(int metric) {
        this.metric = metric;
    }

    public Node getNext2() {
        return next2;
    }

    public void setNext2(Node next2) {
        this.next2 = next2;
    }

    public int getNextId2() {
        return nextId2;
    }

    public void setNextId2(int nextId2) {
        this.nextId2 = nextId2;
    }

    public int getMetric2() {
        return metric2;
    }

    public void setMetric2(int metric2) {
        this.metric2 = metric2;
    }

    public int getState1() {
        return state1;
    }

    public void setState1(int state1) {
        this.state1 = state1;
    }

    public int getState2() {
        return state2;
    }

    public void setState2(int state2) {
        this.state2 = state2;
    }
}
